<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <script src="./jquery-2.1.0.js"></script>
    <title>发帖</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <div>
    <form action="Fatieservlet" method="post" id="formm" >
    	<table>
    		<tr>
    			<td>标题：</td><td><input type="text" id="title" name="title"></td>
    		</tr>
    		
    		<tr>
    			<td>内容：</td><td><input type="text" id="info" name="info" style="width: 400px;height: 200px; text-align: left;"></td>
    		</tr>
    		<tr>
    			<td></td><td><input type="button" value="提交" id="sub"></td>
    		</tr>
    	</table>
    </form>
    </div>
<script type="text/javascript">
$("#sub").click(function(){
	if($("#title").val()==""){
		alert("标题不能为空！");
	}else if($("#info").val()==""){
		alert("内容不能为空！");
	}else{
		alert("提交成功！");
		$("#formm").submit();
	}
});

</script>
  </body>
</html>
